<?php
//mysql_connect("localhost","wanzai_mylibrary","881006");
mysql_connect("127.0.0.1","root","");
mysql_select_db("wanzai_mylibrary");
mysql_query('SET NAMES UTF8');
if($_REQUEST['ISBN']!=null){
$sql=mysql_query("SELECT * FROM  `book` WHERE ISBN LIKE  '%".$_REQUEST['ISBN']."%'");
}else if($_REQUEST['Author']!=null){
$sql=mysql_query("SELECT * FROM  `book` WHERE B_Auther LIKE  '%".$_REQUEST['Author']."%'");
}
	while($e=mysql_fetch_assoc($sql))
			$output[]=$e;
print(json_encode($output));
mysql_close();
?>

